FROM ubuntu:18.04
MAINTAINER seal.jing<744327309@qq.com>




RUN apt-get update && apt-get install -y locales && rm -rf /var/lib/apt/lists/* \
    && localedef -i zh_CN -c -f UTF-8 -A /usr/share/locale/locale.alias zh_CN.UTF-8

ENV LANG zh_CN.UTF-8

RUN apt-get update -o Acquire-by-hash=yes && apt-get install -y openssh-server openjdk-8-jdk

ADD hadoop-2.7.5.tar.gz /usr/local/

ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
ENV HADOOP_HOME=/usr/local/hadoop-2.7.5
ENV PATH=$PATH:$HADOOP_HOME/bin:$HADOOP_HOME/sbin
ENV HADOOP_CONF_DIR=$HADOOP_HOME/etc/hadoop

RUN ssh-keygen -t rsa -f ~/.ssh/id_rsa -P '' && \
    cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

RUN mkdir -p /data/hdfs/namenode && \
    mkdir -p /data/hdfs/datanode && \
    mkdir -p /data/logs

COPY config/* $HADOOP_CONF_DIR/

ADD hbase-1.4.13-bin.tar.gz /usr/local/
ENV HBASE_HOME=/usr/local/hbase-1.4.13
ENV PATH=$PATH:$HBASE_HOME/bin
COPY hbaseconf/* $HBASE_HOME/conf/

COPY phoenix-4.15.0-HBase-1.4-server.jar $HBASE_HOME/lib/
COPY phoenix-core-4.15.0-HBase-1.4.jar $HBASE_HOME/lib/